package com.shipwe.loans.pro

import android.content.Context
import android.view.Gravity
import android.view.WindowManager
import com.shipwe.loans.MyApps
import com.shipwe.loans.R
import com.shipwe.loans.base.BaseDialog
import com.shipwe.loans.utils.AppDensityUtil

/**
 * Shipwe
 * @Author wwdeng
 * @CreateTime: 2024/11/28 10:32
 * @Annotation：
 */
abstract class ShipweDialog(context: Context): BaseDialog(context) {

    override fun initWindow() {
        val params = window!!.attributes
        params.width = MyApps.app.getPhoneWidth() - AppDensityUtil.dp2px(32f)
        params.height = WindowManager.LayoutParams.WRAP_CONTENT
        window!!.attributes = params
        window!!.setWindowAnimations(R.style.dialog_scale_anim) //修改动画样式
        window!!.setGravity(Gravity.CENTER)
    }
}